<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<header th:replace="~{user/header::header-fragment}"></header>
<body class="hold-transition sidebar-mini">
<style>
    .ui-jqgrid tr.jqgrow td {
        white-space: normal !important;
        height: auto;
        vertical-align: text-top;
        padding-top: 2px;
    }
</style>
<div class="wrapper">
    <!-- 引入页面头header-fragment -->
    <div th:replace="~{user/header::header-nav}"></div>
    <!-- 引入工具栏sidebar-fragment -->
    <div th:replace="~{user/sidebar::sidebar-fragment(${path})}"></div>
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <div class="content-header">
            <div class="container-fluid">
            </div><!-- /.container-fluid -->
        </div>
        <!-- Main content -->
        <div class="content">
            <div class="container-fluid">
                <div class="card card-primary card-outline">
                    <div class="card-header">
                        <h3 class="card-title">博客管理</h3>
                    </div> <!-- /.card-body -->
                    <div class="card-body">
                        <div class="grid-btn">
                            <button class="btn btn-success" onclick="addBlog()"><i
                                    class="fa fa-plus"></i>&nbsp;新增
                            </button>
                            <button class="btn btn-info" onclick="editBlog()"><i
                                    class="fa fa-edit"></i>&nbsp;修改
                            </button>
                            <button class="btn btn-danger" onclick="deleteBlog()"><i
                                    class="fa fa-trash-o"></i>&nbsp;删除
                            </button>&nbsp;&nbsp;

                            <!-- 搜索框和按钮 -->
                            <div class="form-inline">
                                <input type="text" placeholder="关键字" id="keyword" class="form-control col-6">&nbsp
                                <select id="searchType" class="form-control small-select">
                                    <option value="title">标题</option>
                                    <option value="tags">标签</option>
                                </select>&nbsp;
                                <button class="btn btn-info" onclick="search()"><i class="fa fa-search"></i>&nbsp;搜索</button>
                            </div>

                        </div>
                        <!-- JqGrid必要DOM,用于创建表格展示列表数据 -->
                        <table id="jqGrid" class="table table-bordered"></table>
                        <!-- JqGrid必要DOM,分页信息区域 -->
                        <div id="jqGridPager"></div>
                    </div><!-- /.card-body -->
                </div>
            </div><!-- /.container-fluid -->
        </div>
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->
    <!-- 引入页脚footer-fragment -->
    <div th:replace="~{user/footer::footer-fragment}"></div>
</div>
<!-- jQuery -->
<script th:src="@{/static/user/plugins/jquery/jquery.min.js}"></script>
<!-- jQuery UI 1.11.4 -->
<script th:src="@{/static/user/plugins/jQueryUI/jquery-ui.min.js}"></script>
<!-- Bootstrap 4 -->
<script th:src="@{/static/user/plugins/bootstrap/js/bootstrap.bundle.min.js}"></script>
<!-- userLTE App -->
<script th:src="@{/static/user/dist/js/adminlte.min.js}"></script>
<!-- jqgrid -->
<script th:src="@{/static/user/plugins/jqgrid-5.3.0/jquery.jqGrid.min.js}"></script>
<script th:src="@{/static/user/plugins/jqgrid-5.3.0/grid.locale-cn.js}"></script>
<!-- sweetalert -->
<script th:src="@{/static/user/plugins/sweetalert/sweetalert.min.js}"></script>
<script th:src="@{/static/user/dist/js/public.js}"></script>
<script th:src="@{/static/user/dist/js/blog.js}"></script>
</body>
</html>
